package org.artifact.xls.convert.type;

import cn.hutool.log.Log;
import cn.hutool.log.LogFactory;

public class CsTypeConvert extends AbstractTypeConvert {
    private static final Log log = LogFactory.get(CsTypeConvert.class);
    @Override
    public String convert(String type,boolean baseType) {
        String convertType = "";
        switch (type){
            case "int":
                convertType = "int";
                break;
            case "ints":
                convertType = "int[]";
                break;
            case "intss":
                convertType = "int[][]";
                break;
            case "str":
                convertType = "string";
                break;
            case "strs":
                convertType = "string[]";
                break;
            case "strss":
                convertType = "string[][]";
                break;
            case "map":
                convertType = "Dictionary";
                break;
            case "list":
                convertType = "List";
                break;
            case "json":
                convertType = "Hashtable";
                break;
            case "txt":
                convertType = "string";
                break;
            default:
                convertType = type;
                log.debug("Error type {}",type);
                break;
        }
        return convertType;
    }
}
